<%@ page contentType="text/html; charset=utf-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%
	String appPath = request.getContextPath();
	String allPath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort();
	pageContext.setAttribute("appPath", appPath);
	pageContext.setAttribute("allPath", allPath);
	request.setCharacterEncoding("gb2312");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="common/head.jsp" flush="true">
	<jsp:param name="title" value="图书馆::建议与意见" />
</jsp:include>
<link href="css/feedback.css" rel="stylesheet" type="text/css" />
</head>
<body> 
<div class="container">
	<div class="top-banner">
			<img src="<%=appPath%>/image/banner.png" width="950" height="174"/>
	</div>
    <table width="777" border="0"  align="center"cellpadding="0" cellspacing="0">
	<tr>
	<td  valign="top" bgcolor="#FFFFFF">  
	<div id="location">当前位置：<a href="<%=appPath%>/index.do">首页</a> &raquo; 建议与意见</div>
	<div id="news">
		<span id="title">建议与意见</span> 
		<div id="content">
		<table >
			<tbody>
				<tr>
					<td class="neirong">&nbsp;&nbsp;&nbsp;&nbsp;设立留言簿的目的是听取读者的意见，采纳读者的合理化建议，提高本馆的服务水平。
					欢迎您就本主页的整体设计、信息涵盖、服务功能等方面提出宝贵意见。您的意见将被加入到留言簿中，供大家浏览留言之用。
					<font  color="red">如您的意见需要得到及时答复，请访问</font><a href="http://202.117.24.176/">虚拟咨询台！</a>
					<br />&nbsp;&nbsp;&nbsp;&nbsp;留言簿使用规则如下：
					</td>
				</tr>
				 <tr>
					<td class="neirong">	
						<ol  > 
							<li>请勿留下无实质意义的意见；</li> 
							<li>请勿在此作商业性的广告；</li> 
							<li>请勿在此发表政治性言论；</li> 
							<li>超出留言范围的意见将被剔除。</li> 
						</ol> 
					&nbsp;&nbsp;&nbsp;&nbsp;下面请您<a href="#comment"><font color="#0066cc"><b>留言</b></font></a>。  
					</td>
				</tr>
				<tr style="height:1px;"> 
					<td>
						<hr />
					</td>
				</tr> 							 
				<c:forEach var="feedback" items="${list}" varStatus="status">
				   <tr> 
				     <td class="neirong"> 
					  <table > 
					     <tr> 
						   <td valign="top" width="10">
						   </td> 
						   <td><b><font color="#0066cc"><b>${total-(indexPage-1)*row-status.count+1}</b></font>—${feedback.comments}</b> 
							  <br/><font color="#0066cc">${feedback.name}</font>&nbsp;&nbsp;&lt;<a href="mailto:${feedback.email}"><font color="#0066cc">${feedback.email}</font></a>&gt;
							  <br/>留言时间--${feedback.commentsdate} --
							  <br/><font color="#FF0000"><b>回复：</b></font>${feedback.reply}
							  <br/><font color="#0066cc">${feedback.adminFromString}</font>
							  <br/>回复时间--${feedback.replydate} --
						   </td> 
						 </tr> 
					  </table> 
                       <hr/> 
					 </td>						   
				   </tr> 
				</c:forEach>
				<tr>
					<td style="font-size:9px ">&nbsp;</td>
				</tr>
				<tr valign="bottom">
					<td align="center" style="font-size:12px ">
						<form name="mainForm" id="mainFormID" action="feedback.do" method="post">
						<input type="hidden" id="action" name="action" value="page"/>
							<jsp:include page="common/page.jsp" flush="true"/>
						</form>  					
					</td>
				</tr>	
				<tr style="height:1px;" > 
					<td>
						<a name="comment"><hr style="color:#0066cc;"/></a>
					</td>
				</tr> 
				<tr>
					<td>
					 <form action="<%=appPath%>/feedback.do" method="post" onSubmit="return CheckForm();" name="comment">
					  <table>
					    <tbody>
							  <tr>
								    <td class="neirong">
									<font color="red" >${result}</font>
									<br/>
									姓　　名：<input type="text" name="Name" value="${Name}" size="20" /><br/>
									 电子邮件：<input type="text" name="Email" value="${Email}" size="20" /><br/>
									 验证码：<input type="text" name="inputRand" size="4" maxlength="4" />
									<img border="0" src="<%=appPath%>/imageCheck.do" />
									<br/>
									 意见与建议：<br/>
									<textarea name="Comment" cols="50" rows="6">${Comment}</textarea><br/>
									<input type="submit" value="提交" />  <input type="reset" value="清除" />
									<input type="hidden" id="action" name="action" value="feedback"/>
									</td>
								</tr>
								<tr>
								<td>
								<p>请勿多次提交，否则您的意见将在留言簿中重复出现.</p>
								<hr/>
								<a href="<%=appPath%>/feedback.do">返回留言簿</a><br/>
							</td>
						  </tr>
						</tbody>							  
					  </table>	
					   </form>						
					</td>
				</tr>
			</tbody>
		</table>	  
		</div>
	</div>
	</td>   
	</tr>
</table>

<jsp:include page="common/foot.jsp" flush="true"/>



<script>                                                           
<!--//                                                                                   
function CheckForm(){
    if (document.comment.Email.value==''){
		alert('Email不能为空,以便及时回复你的问题！');
		document.comment.Email.focus();
		return false;
    }
	if(document.comment.Email.value!="")
	{
		if(document.comment.Email.value.indexOf("@")==-1||document.comment.Email.value.indexOf(".")==-1)
		{
			window.alert("请输入正确的E-mail地址！")
			document.comment.Email.focus();
			return false;
		}
	}
	if (document.comment.Comment.value==''){
		alert('留言不能为空！');
		document.comment.Comment.focus();
		return false;
	}  
	return true;  
}                                                                                  
//-->             
</script>
</div>
</body>
</html>